const express = require('express')

const minAdmin_handle = require('../router_handle/minAdmin')

const router = express.Router()

const expressJoi = require('@escook/express-joi')
const { schema_newpssword } = require('../schema/minAdmin')

//获取个人信息
router.get('/get_minadminInfo', minAdmin_handle.get_minadminInfo)

//修改个人信息
router.post('/update_minAdminInfo', minAdmin_handle.update_minAdminInfo)

//修改个人密码
router.post('/update_minAdminPwd', expressJoi(schema_newpssword), minAdmin_handle.update_minAdminPwd)

//发布公告
router.post('/send_notice', minAdmin_handle.send_notice)

//发布公告
router.post('/dele_notice', minAdmin_handle.dele_notice)

//获取自己发布的公告
router.get('/get_notice', minAdmin_handle.get_notice)

//获取教师提交的课题
router.get('/get_topic', minAdmin_handle.teacher_topic)

//通过教师提交的课题
router.post('/pass_topic', minAdmin_handle.pass_topic)

//获取本学院学生信息
router.get('/get_allstudent', minAdmin_handle.get_allstudent)

//获取本学院教师信息
router.get('/get_allteacher', minAdmin_handle.get_allteacher)

//根据studnetnum 获取单个学生信息
router.post('/get_student', minAdmin_handle.get_student)

//根据teachernum 获取单个教师信息
router.post('/get_teacher', minAdmin_handle.get_teacher)

// 添加学生
router.post('/addstudent', minAdmin_handle.addstudent)

// 添加教师
router.post('/addteacher', minAdmin_handle.addteacher)

//按条件筛选教师
router.post('/choose_teacher', minAdmin_handle.choose_teacher)

//获取教师旧密码
router.post('/get_teacherpwd', minAdmin_handle.get_teacherpwd)

//修该教师旧密码
router.post('/update_teacherpwd', minAdmin_handle.update_teacherpwd)


//获取学生旧密码
router.post('/get_stdpwd', minAdmin_handle.get_pwd)

//修该学生旧密码
router.post('/update_stdpwd', minAdmin_handle.update_pwd)

//获取选择课题的学生
router.get('/choose_topic', minAdmin_handle.choose_topic)

//获取本学院的教师信息
router.get('/get_collageteacher', minAdmin_handle.get_collageteacher)


//添加评阅教师
router.post('/insert_teacher', minAdmin_handle.insert_teacher)

//添加评阅小组
router.post('/insert_group', minAdmin_handle.insert_group)

//给开题答辩小组组长
router.get('/get_groupTeacher', minAdmin_handle.get_groupTeacher)

//给开题答辩小组组长分配学生
router.post('/distribution_student', minAdmin_handle.distribution_student)

//给毕业答辩小组组长分配学生
router.post('/distribution_paper', minAdmin_handle.distribution_paper)

//毕业答辩小组组长
router.get('/groupteacher', minAdmin_handle.groupteacher)

//查看已经分配的学生
router.get('/distribution_studentinfo', minAdmin_handle.distribution_studentinfo)

//查看已经分配毕业答辩的学生
router.get('/distribution_paperinfo', minAdmin_handle.distribution_paperinfo)

//查看学生毕设的分数
router.get('/student_score', minAdmin_handle.student_score)

//获取能够参与开题答辩的学生信息
router.get('/get_studentreportinfo', minAdmin_handle.get_studentreportinfo)

//获取能够参与论文答辩的学生信息
router.get('/get_studentPaperinfo', minAdmin_handle.get_studentPaperinfo)



module.exports = router